# coding:utf-8

import json
import urllib2


def post():
    data = {"cardNo": "", "mobile": "", "cardNo": "1401230000159041", "offset": "0", "limit": "20"}

    # url = "http://localhost:8090/alipay_dev/crm/orderinfo.do"
    url = "http://http://mob.etcsd.com:8099/alipay/crm/orderinfo.do"
    url = "http://10.180.29.60:8680/hipos/payTransaction"
    data = {"biz_type": "AuthIdCard", "certificatenumber": "37098219901209527X", "char_set": "00",
            "mac": "CC126D79751882035E117CAC9EDDB908", "partner_id": "800053100050001", "realname": "公彦勇",
            "version_no": "1.0"}

    headers = {'Content-Type': 'application/json'}
    request = urllib2.Request(url=url, headers=headers, data=json.dumps(data))
    response = urllib2.urlopen(request)

    jsonStr = json.dumps(response.read())
    print jsonStr


def get():
    url = 'http://api.map.baidu.com/geoconv/v1/?from=1&to=5&ak=sd3HNg8CMVEQf1x7cVFBvCY29GCP0GsX&coords=117.347822,38.439509'
    respons = urllib2.urlopen(url=url)
    print respons.read()


if __name__ == '__main__':
    get()
